package com.pie4cloud.pie.bus.config;

import com.pie4cloud.pie.bus.service.KafkaManageService;
import com.pie4cloud.pie.bus.service.listener.KafkaConsumerListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class ApplicationRunnerImpl implements ApplicationRunner {
	@Autowired
	private KafkaManageService kafkaManageService;
	@Autowired
	private KafkaConsumerListener kafkaConsumerListener;
	@Autowired
	private ServiceStatusListner serviceStatusListner;

	@Override
	public void run(ApplicationArguments args) throws Exception {
		//kafkaConsumerService.pollQueue();
		kafkaManageService.resetConsumer();
        serviceStatusListner.init();
	}
}
